<template>
  <div class="article-view">
    <logo-header-dark title="推荐供应商"></logo-header-dark>
    <rich-text-view v-bind="entity"></rich-text-view>
  </div>
</template>

<script>
import LogoHeaderDark from './components/LogoHeaderDark';
import HomepageAPI from '@/api/homepage/homepage';
import RichTextView from './components/RichTextView';

export default {
    components: {
        RichTextView,
        LogoHeaderDark
    },
    data() {
        return {
            entity: {}
        };
    },
    computed: {
        id() {
            return this.$route.params['id'];
        }
    },
    mounted() {
        this.getArticle();
    },
    methods: {
        getArticle() {
            if (!this.id) {
                return;
            }
            HomepageAPI.getSupplier(this.id)
                .then(res => {
                    this.entity = res.obj;
                });
        }
    }
};
</script>

<style lang="scss">
  @import "../../assets/front/front";

  .article-view {
    .content-wrap {
      padding:30px 50px;
      .article-title {
        text-align: center;
      }
      .article-subtitle {
        text-align: right;
      }
      .content {
        margin-top:20px;
        border-top: 1px solid $bg-color;
      }
    }
  }



</style>
